<template>
<!-- 入口  -->
<div class="content-box">
    <div class="index-content">
        <p class="index-des">供应链管理快捷入口</p>
        <div class="index-entry">
            <a href="javascript:;" class="index-entry-items1">
                <div><img src="/static/content/images/SupplyChain/Procurement.png">
                    <el-popover v-model="popove" ref="purPopover" :visible-arrow="false" placement="bottom" width="200" trigger="click">
                        <ul class="popover">
                            <li>
                                <i class="icon iconfont icon-xingxing" @click="BOMPurchaseOrder(`News`)">&#12288;采&nbsp;购&nbsp;订&nbsp;单</i>
                                <!--采购订单-->
                                <el-popover v-model="Pover_OrderModel" ref="poverOrder" placement="right" width="300" trigger="click">
                                    <el-radio-group
                                    style="margin:20px 0 0 0;" 
                                    v-model="purRadio" 
                                    v-popover:popover
                                    @change="changeRadio(purRadio)">
                                        <el-popover ref="popover" 
                                            v-model='tooltipShow'  
                                            placement="right-start"
                                            :visible-arrow="false"
                                            >
                                            <div class="SuppC-Check-Popover">
                                                <span>请选择其他采购具体类型</span>
                                                <hr>
                                                <ul>
                                                    <li @click="check(1,'超额采购')">超额采购</li>
                                                    <li @click="check(2,'非BOM采购')">非BOM采购</li>
                                                    <li @click="check(3,'食品采购')">食品采购</li>
                                                </ul>
                                            </div>
                                        </el-popover>
                                        <span @click="tooltipToggleFn(false)">
                                            <el-radio :label="1">BOM采购</el-radio>
                                        </span>
                                        <span @click="tooltipToggleFn(true)" style="padding-left:15px;">
                                            <el-radio :label="2">{{qtcgText}}</el-radio>
                                            <!-- 给这个绑定一个data然后给上面那个选项绑定一个函数，函数传值，点击是更改绑定的data -->
                                        </span>
                                    </el-radio-group>
                                    <template v-if="inputTemp">
                                        <div style="margin-top:20px">
                                            是否退货&#12288;
                                            <el-switch
                                                v-model="swithReturn"
                                                on-color="#13ce66"
                                                off-color="#ff4949">
                                            </el-switch>
                                        </div> 
                                        <div style="margin-top:20px">
                                            <el-select v-model="supplier" placeholder="请选择供应商" style="width:100%;">
                                                <el-option v-for="item in Supplier" :key="item.value" :label="item.label" :value="item.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                        <!--销售订单-->
                                        <div style="margin-top:20px;" v-if="purRadio !== 2 || OtherType == '超额采购'">
                                            <el-popover
                                                ref="SaleOrderPopover"
                                                placement="bottom"
                                                width="800"
                                                v-model="SaleOrderModel"
                                                trigger="click">
                                                <el-input
                                                placeholder="请输入关键字查询"
                                                style="width:200px;margin-bottom:10px;"
                                                icon="search"
                                                v-model="name1"
                                                :on-icon-click="saleSearch">
                                                </el-input>
                                                <el-table 
                                                border
                                                tooltip-effect="dark"
                                                :data="SaleOrderList"
                                                highlight-current-row
                                                @current-change="handleCurrentChange"
                                                style="width:100%">
                                                <el-table-column property="A" label="单据日期" width="150"></el-table-column>
                                                <el-table-column property="B" label="单据编号" width="150"></el-table-column>
                                                <el-table-column property="C" label="单据名称" width="150"></el-table-column>
                                                <el-table-column property="D" label="销售明细" show-overflow-tooltip></el-table-column>
                                                <el-table-column property="E" label="业务描述" width="180" show-overflow-tooltip></el-table-column>
                                                </el-table>
                                                <div style="margin:10px 0;" class="cover">
                                                    <el-button size="small" @click="Determine" style="float:right;margin-left:10px;">确 定</el-button>
                                                    <el-button size="small" @click="SaleOrderModel = false"  style="float:right;">取 消</el-button>
                                                </div>
                                            </el-popover>
                                            <el-input
                                                placeholder="请选择销售订单"
                                                style="width:100%;"
                                                icon="search"
                                                v-model="input2"
                                                v-popover:SaleOrderPopover><!--非BOM采购或食品采购时候就禁用-->
                                            </el-input>
                                        </div>        
                                        <!--结算方式-->
                                        <div style="margin-top:20px;" v-if="purRadio==1 || purRadio!==''">
                                            <el-cascader :options="optionsWithDisabled"
                                            placeholder="请选择结算方式" style="width:100%;">
                                            </el-cascader>
                                            <el-tooltip class="item" effect="dark" placement="bottom">
                                                <div slot="content">无法取得增值税专用发票，结算方式请选择入仓单结算。<br/><br/>可以取得增值税专用发票，结算方式请选择发票结算。</div>
                                                <i class="icon iconfont icon-iconfontquestion" style="color:#FF4949;position:relative;right:-240px;bottom:25px;"></i>
                                            </el-tooltip>
                                        </div>
                                        <el-button type="success" size="small" style="margin:15px auto 15px;width:50%;display:block;" @click="GoGenerate(`采购订单`)">点击生成订单</el-button>      
                                    </template>
                                </el-popover>
                                <i class="icon iconfont icon-add" @click="AddIcon('订单')" v-popover:poverOrder></i>
                                <i class="icon iconfont icon-list" @click="BOMPurchaseOrder(`list`)"></i>
                            </li>
                            <li>
                                <i class="icon iconfont icon-xingxing" @click="PurchaseIn(`News`)">&#12288;采&nbsp;购&nbsp;入&nbsp;仓</i>
                                <!--采购入仓-->
                                <el-popover v-model="Pover_InModel" ref="poverIn" placement="right" width="300" trigger="click">
                                    <el-radio-group
                                    style="margin:20px 0 0 0;" 
                                    v-model="inRadio" 
                                    @change="changeRadio(inRadio)">
                                        <span @click="tooltipToggleFn1()">
                                            <el-radio :label="1">订单入仓</el-radio>
                                        </span>
                                        <span @click="tooltipToggleFn1()" style="padding-left:15px;">
                                            <el-radio :label="2">非订单入仓</el-radio>
                                        </span>
                                    </el-radio-group>
                                    <template v-if="inputTemp">
                                        <div style="margin-top:20px">
                                            <el-select v-model="supplier" placeholder="请选择供应商" style="width:100%;">
                                                <el-option v-for="item in Supplier" :key="item.value" :label="item.label" :value="item.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                        <!--采购订单-->
                                        <div style="margin-top:20px;" v-if="inRadio !== 2">
                                            <el-popover
                                                ref="PurOrderPopover"
                                                placement="bottom"
                                                width="800"
                                                v-model="PurOrderModel"
                                                trigger="click">
                                                <el-input
                                                placeholder="请输入关键字查询"
                                                style="width:200px;margin-bottom:10px;"
                                                icon="search"
                                                v-model="name1"
                                                :on-icon-click="saleSearch">
                                                </el-input>
                                                <el-table 
                                                border
                                                tooltip-effect="dark"
                                                :data="PurOrderList"
                                                highlight-current-row
                                                @current-change="handleCurrentChange"
                                                style="width:100%">
                                                <el-table-column property="A" label="单据日期" width="180"></el-table-column>
                                                <el-table-column property="B" label="单据编号" width="180"></el-table-column>
                                                <el-table-column property="C" label="单据名称" width="180"></el-table-column>
                                                <el-table-column property="D" label="业务描述" show-overflow-tooltip></el-table-column>
                                                </el-table>
                                                <div style="margin:10px 0;" class="cover">
                                                    <el-button size="small" @click="Determine" style="float:right;margin-left:10px;">确 定</el-button>
                                                    <el-button size="small" @click="PurOrderModel = false"  style="float:right;">取 消</el-button>
                                                </div>
                                            </el-popover>
                                            <el-input
                                                placeholder="请选择采购订单"
                                                style="width:100%;"
                                                icon="search"
                                                v-model="input2"
                                                v-popover:PurOrderPopover>
                                            </el-input>
                                        </div>
                                        <!--结算方式-->
                                        <div style="margin-top:20px;height:36px;" v-if="inRadio==2">
                                            <el-cascader :options="optionsWithDisabled"
                                            placeholder="请选择结算方式" style="width:100%;">
                                            </el-cascader>
                                            <el-tooltip class="item" effect="dark" placement="bottom">
                                                <div slot="content">无法取得增值税专用发票，结算方式请选择入仓单结算。<br/><br/>可以取得增值税专用发票，结算方式请选择发票结算。</div>
                                                <i class="icon iconfont icon-iconfontquestion" style="color:#FF4949;position:relative;right:-240px;bottom:25px;"></i>
                                            </el-tooltip>
                                        </div>    
                                        <!--进货仓库-->
                                        <div style="margin-top:20px;">
                                            <el-select v-model="supplier" placeholder="请选择仓库" style="width:100%;">
                                                <el-option v-for="item in Supplier" :key="item.value" :label="item.label" :value="item.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                        <el-button type="success" size="small" style="margin:15px auto 15px;width:50%;display:block;" @click="GoGenerate(`采购入仓`)">点击生成订单</el-button>      
                                    </template>
                                </el-popover>
                                <i class="icon iconfont icon-add"  @click="AddIcon('入仓')" v-popover:poverIn></i>
                                <i class="icon iconfont icon-list" @click="PurchaseIn(`list`)"></i>
                            </li>
                            <li>
                                <i class="icon iconfont icon-xingxing" @click="PurchaseInvoice(`News`)">&#12288;采&nbsp;购&nbsp;发&nbsp;票</i>
                                <el-popover v-model="Pover_InvoiceModel" ref="poverInvoice" placement="right" width="300" trigger="click">
                                    <div style="margin-top:20px">
                                        <el-select v-model="supplier" placeholder="请选择供应商" style="width:100%;">
                                            <el-option v-for="item in Supplier" :key="item.value" :label="item.label" :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </div>
                                    <!--采购进货单-->
                                    <div style="margin-top:20px;" v-if="inRadio !== 2">
                                        <el-popover
                                            ref="StockOrderPopover"
                                            placement="bottom"
                                            width="800"
                                            v-model="StockOrderModel"
                                            trigger="click">
                                            <el-input
                                            placeholder="请输入关键字查询"
                                            style="width:200px;margin-bottom:10px;"
                                            icon="search"
                                            v-model="name1"
                                            :on-icon-click="saleSearch">
                                            </el-input>
                                            <el-table 
                                            :data="StockList"
                                            tooltip-effect="dark"
                                            highlight-current-row
                                            @current-change="handleCurrentChange"
                                            style="width:100%"
                                            @selection-change="handleSelectionList">
                                            <el-table-column type="selection" width="55"></el-table-column>>
                                            <el-table-column 
                                                prop="A" 
                                                label="进货单号" 
                                                show-overflow-tooltip>
                                            </el-table-column>
                                            <el-table-column 
                                                prop="B" 
                                                label="采购金额" 
                                                width="180">
                                            </el-table-column>
                                            <el-table-column 
                                                prop="C" 
                                                label="未开票总额" 
                                                width="180">
                                            </el-table-column>
                                            <el-table-column 
                                                prop="D" 
                                                label="采购订单号" 
                                                show-overflow-tooltip>
                                            </el-table-column>
                                            </el-table>
                                            <div style="margin:10px 0;" class="cover">
                                                <el-button size="small" @click="Determine" style="float:right;margin-left:10px;">确 定</el-button>
                                                <el-button size="small" @click="StockOrderModel = false"  style="float:right;">取 消</el-button>
                                            </div>
                                        </el-popover>
                                        <el-input
                                            placeholder="请选择对应的采购进货单"
                                            style="width:100%;"
                                            icon="search"
                                            v-model="input2"
                                            v-popover:StockOrderPopover>
                                        </el-input>
                                        <div style="margin-top:20px">
                                            <el-input v-model="input2" placeholder="请录入发票金额"></el-input>
                                        </div>
                                        <div style="margin-top:20px">
                                            <el-input v-model="input2" placeholder="请录入发票号码"></el-input>
                                        </div>
                                    </div>
                                    <el-button type="success" size="small" style="margin:15px auto 15px;width:50%;display:block;" @click="GoGenerate(`采购发票`)">点击生成订单</el-button>      
                                </el-popover>
                                <i class="icon iconfont icon-add"  @click="AddIcon('发票')" v-popover:poverInvoice></i>
                                <i class="icon iconfont icon-list" @click="PurchaseInvoice(`list`)"></i>
                            </li>
                            <li>
                                <i class="icon iconfont icon-xingxing" @click="PurchasePayment('News')">&#12288;采&nbsp;购&nbsp;付&nbsp;款</i>
                                <el-popover 
                                    v-model="Pover_PayModel" 
                                    ref="poverPayment" 
                                    placement="right" 
                                    width="300" 
                                    trigger="click">
                                    <div style="font-weight:bold;font-size:16px;">
                                        物品是否已经入仓
                                    </div>
                                    <el-radio-group
                                    style="margin:20px 0 0 0;" 
                                    v-model="payRadio" 
                                    @change="changeRadio(payRadio)">
                                        <span @click="tooltipToggleFn1()">
                                            <el-radio :label="1">是</el-radio>
                                        </span>
                                        <span @click="tooltipToggleFn1()" style="padding-left:15px;">
                                            <el-radio :label="2">否</el-radio>
                                        </span>
                                    </el-radio-group>
                                    <template v-if="inputTemp">
                                        <div style="margin-top:20px">
                                            <span style="font-size:16px;" v-if="payRadio==1">请选择</span>
                                            <span style="font-size:16px;" v-if="payRadio==2">您需要申请一笔预付款,请按以下项目选择</span>
                                        </div>
                                        <div style="margin-top:20px">
                                            <el-select v-model="supplier" placeholder="请选择供应商" style="width:100%;">
                                                <el-option v-for="item in Supplier" :key="item.value" :label="item.label" :value="item.value">
                                                </el-option>
                                            </el-select>
                                        </div>
                                        <div style="margin-top:20px;" v-if="payRadio==1">
                                            <el-input v-model="input2" placeholder="请录入付款总额"></el-input>
                                        </div>
                                        <div style="margin-top:20px" v-if="payRadio==2">
                                            <el-popover
                                                ref="PurOrderPayPopover"
                                                placement="bottom"
                                                width="900"
                                                v-model="PurOrderPayModel"
                                                trigger="click">
                                                <el-input
                                                placeholder="请输入关键字查询"
                                                style="width:200px;margin-bottom:10px;"
                                                icon="search"
                                                v-model="name1"
                                                :on-icon-click="saleSearch">
                                                </el-input>
                                                <el-table 
                                                border
                                                tooltip-effect="dark"
                                                :data="PurOrderPayList"
                                                highlight-current-row
                                                @current-change="handleCurrentChange"
                                                style="width:100%">
                                                <el-table-column property="A" label="单据日期" width="120"></el-table-column>
                                                <el-table-column property="B" label="单据编号" width="120"></el-table-column>
                                                <el-table-column property="C" label="单据名称" width="120"></el-table-column>
                                                <el-table-column property="D" label="订单金额" width="100" show-overflow-tooltip></el-table-column>
                                                <el-table-column property="E" label="结算方式" show-overflow-tooltip></el-table-column>
                                                <el-table-column property="F" label="业务描述" show-overflow-tooltip></el-table-column>
                                                </el-table>
                                                <div style="margin:10px 0;" class="cover">
                                                    <el-button size="small" @click="Determine" style="float:right;margin-left:10px;">确 定</el-button>
                                                    <el-button size="small" @click="PurOrderPayModel = false"  style="float:right;">取 消</el-button>
                                                </div>
                                            </el-popover>
                                            <el-input
                                            placeholder="请选择采购订单"
                                            style="width:100%;"
                                            icon="search"
                                            v-model="input2"
                                            v-popover:PurOrderPayPopover>
                                            </el-input>
                                        </div>
                                        <div style="margin-top:20px;" v-if="payRadio==2">
                                            <el-input v-model="input2" placeholder="请录入预付总额"></el-input>
                                        </div>
                                        <div style="margin-top:20px;">
                                            <el-button type="success" size="small" style="margin:15px auto 15px;width:50%;display:block;" @click="GoGenerate(`采购付款单`)">点击生成订单</el-button>      
                                        </div>
                                    </template>
                                </el-popover>
                                <i class="icon iconfont icon-add" @click="AddIcon('付款')" v-popover:poverPayment></i>
                                <i class="icon iconfont icon-list" @click="PurchasePayment('list')"></i>
                            </li>
                        </ul>
                    </el-popover>
                    <el-button v-popover:purPopover @click="inputTemp = false">采购业务</el-button>
                </div>
            </a>
            <a href="javascript:;" class="index-entry-items2" @click="OtherPurchase">
                <div><img src="/static/content/images/SupplyChain/Sale.png">
                    <el-button>销售业务</el-button>
                </div>
            </a>
            <a href="javascript:;" class="index-entry-items3" @click="PurchaseIn">
                <div><img src="/static/content/images/SupplyChain/Production.png">
                    <el-button>生产管理</el-button>
                </div>
            </a>
            <a href="javascript:;" class="index-entry-items3" @click="PurchaseIn">
                <div><img src="/static/content/images/SupplyChain/Outsourcing.png">
                    <el-button>委外管理</el-button>
                </div>
            </a>
            <a href="javascript:;" class="index-entry-items3" @click="PurchaseIn">
                <div><img src="/static/content/images/SupplyChain/ImportAndIn.png">
                    <el-button>其他出/入仓</el-button>
                </div>
            </a>
            <a href="javascript:;" class="index-entry-items4" @click="PurchaseInvoice">
                <div><img src="/static/content/images/SupplyChain/Inventory Query.png">
                    <el-button>库存查询</el-button>
                </div>
            </a>
        </div>
    </div>
    

    <!--采购入仓单-->
    <el-dialog title="入仓" :visible.sync="InDialog" :modal-append-to-body="false" size="tiny">
        <div style="margin-top:20px;text-align:center">
            <el-radio-group v-model="InRadio"  style="width:60%">
                <el-radio :label="1">订单入仓</el-radio>
                <el-radio :label="2">非订单入仓</el-radio>
            </el-radio-group>
        </div>
        <!--供应商-->
        <div style="margin-top:20px;text-align:center">
            <el-select v-model="supplier" placeholder="请选择供应商" style="width:60%">
                <el-option v-for="item in Supplier" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </div>
        <!--采购订单-->
        <div style="margin-top:20px;text-align:center" v-if="InRadio==1">
            <el-select v-model="saleOrder" placeholder="请选择采购订单" style="width:60%">
                <el-option v-for="item in SaleOrder" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </div>
        <!--进货仓库-->
        <div style="margin-top:20px;text-align:center">
            <el-select v-model="warehouse" placeholder="请选择进货仓库" style="width:60%">
                <el-option v-for="(item,index) in Warehouse" :key="index" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </div>
        <!--结算方式-->
        <div style="margin-top:20px;text-align:center" v-if="InRadio==2">
            <el-cascader :options="optionsWithDisabled"
            style="width:60%"
            placeholder="请选择结算方式">
            </el-cascader>
            <el-tooltip class="item" effect="dark" placement="bottom">
                <div slot="content">无法取得发票，结算方式请选择入仓单结算。<br/><br/>可以取得增值税专用发票结算方式请选择发票结算。</div>
                <i class="icon iconfont icon-iconfontquestion" style="color:#FF4949;position: relative;left: -64px;"></i>
            </el-tooltip>
        </div>
        <div style="margin-top:20px;text-align:center">
            <el-button type="success" style="width:60%">点击生成订单</el-button>
        </div>
    </el-dialog>
</div>
</template>
<script>
export default {
    name: 'SupplyChainManage',
    data() {
        return {
            qtcgText:'其他采购',
            inputTemp: false,
            radio:2,
            popove:false,
            Pover_OrderModel:false,
            Pover_InModel:false,
            Pover_InvoiceModel:false,
            Pover_PayModel:false,
            OrderDialog: false,//订单
            InDialog: false,//入仓
            InvoiceDialog: false,//发票
            Payment:false, //付款
            SaleOrderDialog: false,//销售订单
            InOrderDialog:false,
            SaleOrderModel:false,
            PurOrderModel:false,
            PurOrderPayModel:false,
            StockOrderModel:false,
            orderNumber:'',
            purRadio:'',
            inRadio:'',
            payRadio:'',
            swithReturn:false,
            multipleSelection:[],
            multipleSelectSale:[],
            InRadio:1,
            InvoiceTotal:'',
            InvoiceNumber:'',
            input2: "",
            NoList:'',
            currentRow: null,
            name1:"",
            PurOrderList:[
                {
                    A: "2018-03-03",
                    B: "FG18030019",
                    C: "非BOM采购",
                    D: ""
                },
                {
                    A: "2018-03-03",
                    B: "FG18030019",
                    C: "非BOM采购",
                    D: ""
                },
                {
                    A: "2018-03-03",
                    B: "FG18030019",
                    C: "非BOM采购",
                    D: ""
                },
            ],
            StockList:[
                {
                    A:"CH18030010",
                    B:1500,
                    C:1500,
                    D:"SC18030005"
                },
                {
                    A:"CH18030010",
                    B:1500,
                    C:1500,
                    D:"SC18030005"
                },
                {
                    A:"CH18030010",
                    B:1500,
                    C:1500,
                    D:"SC18030005"
                }
            ],
            PurOrderPayList:[
                {
                    A: "2018-03-03",
                    B: "FG18030019",
                    C: "非BOM采购",
                    D: 2000,
                    E: "发票结算",
                    F: "********"
                },{
                    A: "2018-03-03",
                    B: "FG18030019",
                    C: "非BOM采购",
                    D: 2000,
                    E: "发票结算",
                    F: "********"
                },{
                    A: "2018-03-03",
                    B: "FG18030019",
                    C: "非BOM采购",
                    D: 2000,
                    E: "发票结算",
                    F: "********"
                }
            ],
            SaleOrderList: [
                {
                A: "CX180100001",
                B: "材料销售",
                C: "郑州刘军法",
                D: "KABA970240,KABA150160",
                E: ""
                },
                {
                A: "CX180100001",
                B: "材料销售",
                C: "郑州刘军法",
                D: "KABA970240,KABA150160",
                E: ""
                },
                {
                A: "CX180100001",
                B: "材料销售",
                C: "郑州刘军法",
                D: "KABA970240,KABA150160",
                E: ""
                },
                {
                A: "CX180100001",
                B: "材料销售",
                C: "郑州刘军法",
                D: "KABA970240,KABA150160",
                E: ""
                }
            ],
            OrderData:[{
                ReceiptNo:'CH18030010',
                purchaseTotal:1500,
                OutstandingAmount:1500,
                purchaseOrder:'SC18030005'
            },{
                ReceiptNo:'CH18030011',
                purchaseTotal:5500,
                OutstandingAmount:3000,
                purchaseOrder:'SC18030005'
            },{
                ReceiptNo:'CH18030012',
                purchaseTotal:4000,
                OutstandingAmount:6600,
                purchaseOrder:'SC18030777'
            }],
            Warehouse: [{
                value: '选项11',
                label: '黄金糕'
            },{
                value: '选项11',
                label: '黄金糕'
            }],
            warehouse:'',
            Supplier: [{
                value: '选项1',
                label: '黄金糕'
            }, {
                value: '选项2',
                label: '双皮奶'
            }],
            supplier: '',
            SaleOrder: [{
                value: '选项1',
                label: '黄金糕'
            }, {
                value: '选项2',
                label: '双皮奶'
            }],
            saleOrder: '',
            optionsWithDisabled: [{
                value: 'zujian',
                label: '发票结算',
                children: [{
                        value: 'l1',
                        label: '11%'
                    },{
                        value: 'l7',
                        label: '17%'
                    },{
                        value: '6',
                        label: '6%'
                }]
            },{
                value: 'zhinan',
                label: '入仓结算',
            }],
            tooltipShow:false
        }
    },
    computed:{
        
    },
    methods: {
        tooltipToggleFn(is = true){
            this.tooltipShow = is;
            if(!is){
                this.inputTemp = true;
            }else{
                this.inputTemp = false;
            }
        },
        tooltipToggleFn1(){
            this.inputTemp = true;
        },
        AddIcon(e){
            if(e==="入仓"){
                this.inRadio = '';
                this.inputTemp = false;
                this.Pover_OrderModel = false;//订单
                this.Pover_InvoiceModel = false;//发票
                this.Pover_PayModel = false;//付款
            }else if(e==="订单"){
                this.purRadio = '';
                this.inputTemp = false;
                this.Pover_InModel = false;//入仓
                this.Pover_InvoiceModel = false;//发票
                this.Pover_PayModel = false;//付款
            }else if(e==="发票"){
                this.Pover_InModel = false;//入仓
                this.Pover_OrderModel = false;//订单
                this.Pover_PayModel = false;//付款
            }else if(e==="付款"){
                this.payRadio = '';
                this.inputTemp = false;
                this.Pover_InModel = false;//入仓
                this.Pover_OrderModel = false;//订单
                this.Pover_InvoiceModel = false//发票
            }
        },
        handleSelectionList(val){
            let arr = [];
            this.multipleSelection = val;
            this.multipleSelection.forEach((item,index)=>{
                arr.push(item.ReceiptNo)
            })
            this.NoList = arr.join();
        },
        Determine(){

        },
        handleCurrentChange(val) {
            this.currentRow = val;
            console.log(this.currentRow, "this.currentRow");
        },
        changeRadio(e){
            console.log(e,'**');
        },
        saleSearch(){
        },
        confirm(){
            this.orderNumber = this.NoList;
            this.InOrderDialog = false;
            console.log(this.orderNumber);
        },
        check(e,text){
            this.inputTemp = true;
            this.qtcgText = text; 
            if(e==2){
                this.OtherType = "非BOM采购";
                console.log("非BOM采购");
            }else if(e==3){
                this.OtherType = "食品采购";
                console.log("食品采购");
            }else{
                this.OtherType = "超额采购";
                console.log("超额采购");
            }
            this.tooltipToggleFn(false);
        },
        handleIconClick(){
            //打开进货单列表窗口
            this.InOrderDialog = true;
        },
        //点击生成订单
        GoGenerate(e){
            if(e==='采购订单'){
                //BOM采购
                if(this.purRadio===1){
                    this.$router.push({
                        path: '/BOMPurchaseOrder',
                        query:{
                            BOM:true,
                            generate:true,
                        }
                    })
                //其他采购
                }else{
                    this.OtherType=="超额采购" ? this.OtherType = 1 : this.OtherType=="非BOM采购" ? this.OtherType = 2 :  this.OtherType = 3 ;
                    //超额采购是1  非BOM采购是2 食品采购是3
                    console.log(this.OtherType,'this.OtherType');
                    this.$router.push({
                        path: '/BOMPurchaseOrder',
                        query:{
                            Other:true,
                            generate:true,
                            OtherType:this.OtherType
                        }
                    })
                }
            }else if(e===`采购入仓`){
                if(this.inRadio===1){
                    this.$router.push({
                        path: 'PurchaseIn',
                        query:{
                            InYes:true,
                            generate:true,
                        }
                    })
                    console.log(`订单入仓`);
                }else if(this.inRadio===2){
                    this.$router.push({
                        path: '/PurchaseIn',
                        query:{
                            InNot:true,
                            generate:true,
                        }
                    })
                    console.log(`非订单入仓`);
                }
            }else if(e===`采购发票`){
                this.$router.push({
                    path: '/PurchaseInvoice',
                    query:{
                        generate:true
                    }
                })
            }else if(e===`采购付款单`){
                if(this.payRadio===1){
                    this.$router.push({
                        path: '/PurchasePayment',
                        query:{
                            isAdPay:false
                        }
                    })
                }else{
                    this.$router.push({
                        path: '/PurchasePayment',
                        query:{
                            isAdPay:true
                        }
                    })
                }
                
            }
        },
        //打开付款单窗口
        PurchasePayment(e){
            if(e=="News"){
                console.log(e,'新建');
                this.$router.push({
                    path:'/PurchasePayment',
                    query:{
                        generate:true
                    }
                })
            }else if(e=="list"){
                console.log(e,"列表");
                this.$router.push({
                    path:'PurchasePayment'
                })
            }
        },
        //BOM采购
        BOMPurchaseOrder(e) {
            if(e=="News"){
                console.log(e,'新建');
                this.$router.push({
                    path: '/BOMPurchaseOrder',
                    query: {
                        News: true
                    }
                })
            }else if(e=="list"){
                console.log(e,'列表');
                this.$router.push({
                    path: '/BOMPurchaseOrder',
                })
            }
        },
        //采购入仓
        PurchaseIn(e){
            if(e=="News"){
                console.log(e,'新建');
                this.$router.push({
                    path: '/PurchaseIn',
                    query: {
                        News: true
                    }
                })
            }else if(e=="list"){
                console.log(e,'列表');
                this.$router.push({
                    path: '/PurchaseIn',
                })
            }
        },
        OtherPurchase() {
            this.$router.push({
                path: '/OtherPurchase',
                query: {
                    News: true
                }
            })
        },
        //采购发票
        PurchaseInvoice(e) {
            if(e==="News"){
                this.$router.push({
                    path: '/PurchaseInvoice',
                    query: {
                        generate: true
                    }
                })
            }else if(e==="list"){
                this.$router.push({
                    path: '/PurchaseInvoice',
                })
            }
            
        },
    },
    mounted() {
    }
}
</script>
<style scoped lang="scss">
@import '~scss_vars';
@import '../../common/css/index.css';
.index-des {
    width: 920px;
    margin: 30px auto 20px auto;
    font-size: 16px;
    font-weight: bold;
}
.index-entry {
    width: 920px;
    margin: 0 auto;
    display: flex;
    a {
        display: inline-block;
        text-align: center;
        color: #000;
        text-decoration: none;
        flex: 1;
        div {
            padding: 10px 35px;
            line-height: 1;
            img {
                width: 88px;
            }
            .el-button {
                background: $color-violet;
                border: 1px solid $color-violet;
                color: #fff;
            }
        }
    }
}
ul.popover {
    li {
        margin: 5px 0;
        padding: 10px; // 先隐藏
        .icon-add,
        .icon-list {
            display: none;
        }
        &:hover {
            background-color: #E5E9F2;
            color:#399eea;
            cursor: pointer;
            .icon-xingxing {
                color:#399eea;
                &::before {
                    content: "\e631";
                }
            } //在悬浮显示，那俩图标的class
            .icon-add,
            .icon-list {
                display: inline-block;
            }
        }
    }
}
</style>
